using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace TestModels.Models.Mapping
{
    public class CollectMap : EntityTypeConfiguration<Collect>
    {
        public CollectMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.SellerName)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Collect");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.SellerID).HasColumnName("SellerID");
            this.Property(t => t.Created).HasColumnName("Created");
            this.Property(t => t.SellerName).HasColumnName("SellerName");
        }
    }
}
